<template>
    <div>
  <el-breadcrumb separator="/" replace=true>
  <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
  <el-breadcrumb-item :to="{ path: '/cmmg' }">商品分类</el-breadcrumb-item>

</el-breadcrumb>
 <el-button plain @click="addDialog">添加</el-button>
<v-list @edit='edit'/>
<v-dialog :isShow='isShow' :isAdd='isAdd'  @cancel='cancel' ref='bannerRef'/>
    </div>
</template>

<script>
import vList from './list.vue'
import vDialog from './dialog.vue'

export default {
  // 菜单管理
  data () {
    return {

      isShow: false,
      isAdd: true

    }
  },
  methods: {
    addDialog () {
      this.isShow = true
      this.isAdd = true
    },
    cancel (e) {
      this.isShow = e
    },
    edit (e) {
      this.isShow = true
      this.isAdd = false
      this.$refs.bannerRef.lookup(e)
    }
  },
  components: {
    vList, vDialog
  }
}
</script>

<style scoped>
.el-button{
  margin-top: 20px;
  /* border: 1px solid #b3d8ff;
  background-color: #ecf5ff;
  color: #409eff; */
}
</style>
